import java.util.ArrayList;
import java.util.List;

public class Solution728 {
    public List<Integer> selfDividingNumbers(int left, int right) {
        List<Integer> ans=new ArrayList<>();
        for (int i=left;i<=right;i++){
            String s=String.valueOf(i);
            boolean flag=true;
            for (char c : s.toCharArray()) {
                if (c=='0' || i%(c-'0')!=0){
                    flag=false;
                    break;
                }
            }
            if (flag){
                ans.add(i);
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new Solution728().selfDividingNumbers(1,22));
    }
}
